package study.ttl.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import study.ttl.entity.Logs;

import java.util.List;

@Mapper
public interface LogsMapper {

    // 插入日志
    void insert(Logs logs);

    // 根据id删除
    @Delete("delete from logs where id = #{id}")
    void deleteById(Integer id);

    // 根据id修改
    void updateById(Logs logs);

    // 根据id查询
    @Select("select * from logs where id = #{id}")
    Logs selectById(Integer id);

    // 根据条件查询所有
    List<Logs> selectAll(Logs logs);

    // 批量删除
    void deleteBatch(List<Integer> ids);
}
